﻿@section styles{
    <link href="~/lib/AdminLTE/plugins/iCheck/all.css" rel="stylesheet" asp-append-version="true" />
    <link href="~/lib/bootstrapvalidator/dist/css/bootstrapValidator.min.css" rel="stylesheet" asp-append-version="true" />
    <link href="~/lib/bootstrap-treeview/dist/bootstrap-treeview.min.css" rel="stylesheet" asp-append-version="true" />
    <link href="~/css/base.css" rel="stylesheet" asp-append-version="true" />
}
@section scripts{
    <script src="~/lib/bootstrap-treeview/dist/bootstrap-treeview.min.js" asp-append-version="true"></script>
    <script src="~/lib/bootstrapvalidator/dist/js/bootstrapValidator.min.js" asp-append-version="true"></script>
    <script src="~/lib/AdminLTE/plugins/iCheck/icheck.min.js" asp-append-version="true"></script>
    <script src="~/view-resources/Views/Organization/Index.js" asp-append-version="true"></script>
}

<div class="content-wrapper" id="mainDiv" style="min-height: 935px;">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>组织机构管理</h1>
        <ol class="breadcrumb">
            <li><a href=""><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="#">系统管理</a></li>
            <li class="active">组织机构管理</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-3">
                <!-- Profile Image -->
                <div class="box box-primary">
                    <div class="box-body box-profile">
                        <div id="tree" class="treeview">
                            
                        </div>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
            <!-- /.col -->
            <div class="col-md-9">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <div class="btn-group">
                            <button type="button" class="btn btn-default" data-btn-type="addRoot">
                                <li class="fa fa-plus">&nbsp;新增根机构</li>
                            </button>
                            <button type="button" class="btn btn-default" data-btn-type="add">
                                <li class="fa fa-plus">&nbsp;新增下级机构</li>
                            </button>
                            <button type="button" class="btn btn-default" data-btn-type="edit">
                                <li class="fa fa-edit">&nbsp;编辑当前机构</li>
                            </button>
                            <button type="button" class="btn btn-default" data-btn-type="delete">
                                <li class="fa fa-remove">&nbsp;删除当前机构</li>
                            </button>
                        </div>
                        <!-- /.box-tools -->
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <form class="form-horizontal bv-form" id="org-form" novalidate="novalidate">
                            <input type="hidden" id="id" name="id" />
                            <input type="hidden" id="createDate" name="createDate" data-flag="date" data-format="yyyy-mm-dd hh:ii:ss" value="@DateTime.Now.ToString("yyyy-mm-dd hh:ii:ss")" />
                            <input type="hidden" id="parentNodeId" name="parentNodeId" />
                            <div class="form-group">
                                <label for="parentName" class="col-sm-2 control-label">上级</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" disabled="disabled" id="parentName" name="parentNodeName" placeholder="上级">
                                </div>
                            </div>

                            <div class="form-group has-feedback">
                                <label for="name" class="col-sm-2 control-label">名称</label>

                                <div class="col-sm-9">
                                    <input type="text" class="form-control" id="name" name="name" placeholder="名称" data-bv-field="name">
                                </div>
                            </div>
                            <div class="form-group has-feedback">
                                <label for="code" class="col-sm-2 control-label">编码</label>

                                <div class="col-sm-9">
                                    <input type="text" class="form-control" id="code" name="code" placeholder="编码" data-bv-field="code">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">机构类型</label>
                                <div class="col-sm-9">
                                    <label class="control-label" aria-checked="false" aria-disabled="false">
                                        <div class="iradio_square-blue" aria-checked="false" aria-disabled="false" style="position: relative;">
                                            <input type="radio" name="organizationType" data-flag="icheck" value="0" style="position: absolute; opacity: 0;">
                                        </div> 
                                        一级部门
                                    </label> &nbsp;&nbsp;&nbsp;
                                    <label class="control-label" aria-checked="false" aria-disabled="false">
                                        <div class="iradio_square-blue" aria-checked="false" aria-disabled="false" style="position: relative;">
                                            <input type="radio" name="organizationType" data-flag="icheck" value="1" style="position: absolute; opacity: 0;">
                                        </div>
                                        二级部门
                                    </label>&nbsp;&nbsp;&nbsp; 
                                    <label class="control-label" aria-checked="false" aria-disabled="false">
                                        <div class="iradio_square-blue" aria-checked="false" aria-disabled="false" style="position: relative;">
                                            <input type="radio" name="organizationType" data-flag="icheck" value="2" style="position: absolute; opacity: 0;">
                                        </div>
                                        三级部门
                                    </label>

                                </div>
                            </div>
                            <div class="form-group has-feedback">
                                <label for="levelCode" class="col-sm-2 control-label">层级编码</label>

                                <div class="col-sm-9">
                                    <input type="text" class="form-control" id="levelCode" name="levelCode" placeholder="层级编码" data-bv-field="levelCode">
                                </div>
                            </div>
                            <div class="form-group has-feedback">
                                <label class="col-sm-2 control-label">是否可用</label>
                                <div class="col-sm-9">
                                    <label class="control-label">
                                        <input type="radio" name="status" class="square-green" value="0" data-bv-field="deleted"> 启用
                                    </label> &nbsp;&nbsp;&nbsp; 
                                    <label class="control-label">
                                        <input type="radio" name="status" class="square-green" value="1" data-bv-field="deleted"> 禁用
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="remark" class="col-sm-2 control-label">备注</label>

                                <div class="col-sm-9">
                                    <textarea class="form-control" id="remark" name="remark" placeholder="说明"></textarea>
                                </div>
                            </div>
                            <div class="box-footer" style="display:none">
                                <div class="text-center">
                                    <button type="button" class="btn btn-default" data-btn-type="cancel">
                                        <i class="fa fa-reply">&nbsp;取消</i>
                                    </button>
                                    <button type="button" class="btn btn-primary" data-btn-type="save">
                                        <i class="fa fa-save">&nbsp;保存</i>
                                    </button>
                                </div>
                            </div>
                            <input type="hidden" value="">
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
